VERSION 5.00
Begin VB.Form frmCommodityMore 
   BackColor       =   &H00FFFFFF&
   Caption         =   "Commodity Enhanced Info"
   ClientHeight    =   2445
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   10050
   Icon            =   "frmCommodityMore.frx":0000
   LinkTopic       =   "Form1"
   ScaleHeight     =   2445
   ScaleWidth      =   10050
   StartUpPosition =   1  'CenterOwner
   Begin VB.ComboBox cboDocument3 
      Height          =   315
      Left            =   1800
      TabIndex        =   10
      Top             =   1920
      Width           =   2775
   End
   Begin VB.ComboBox cboDocument2 
      Height          =   315
      Left            =   1800
      TabIndex        =   8
      Top             =   1440
      Width           =   2775
   End
   Begin VB.ComboBox cboDocument1 
      Height          =   315
      Left            =   1800
      TabIndex        =   6
      Top             =   960
      Width           =   2775
   End
   Begin VB.ComboBox cboMID 
      Height          =   315
      Left            =   1800
      TabIndex        =   0
      Top             =   360
      Width           =   2775
   End
   Begin VB.TextBox textFCCAddress 
      Height          =   1155
      Left            =   6360
      MultiLine       =   -1  'True
      ScrollBars      =   2  'Vertical
      TabIndex        =   1
      Top             =   360
      Width           =   3375
   End
   Begin VB.CommandButton cmdCancel 
      Appearance      =   0  'Flat
      BackColor       =   &H00E0E0E0&
      Cancel          =   -1  'True
      Caption         =   "Cancel"
      Height          =   315
      Left            =   8160
      MaskColor       =   &H0080C0FF&
      Style           =   1  'Graphical
      TabIndex        =   3
      Top             =   1860
      UseMaskColor    =   -1  'True
      Width           =   1215
   End
   Begin VB.CommandButton cmdSave 
      Appearance      =   0  'Flat
      BackColor       =   &H00E0E0E0&
      Caption         =   "&Save/Exit"
      Default         =   -1  'True
      Height          =   315
      Left            =   6360
      MaskColor       =   &H0080C0FF&
      Style           =   1  'Graphical
      TabIndex        =   2
      Top             =   1860
      UseMaskColor    =   -1  'True
      Width           =   1215
   End
   Begin VB.Label Label3 
      Alignment       =   1  'Right Justify
      BackColor       =   &H00FFFFFF&
      Caption         =   "Document 3:"
      Height          =   255
      Left            =   480
      TabIndex        =   11
      Top             =   1920
      Width           =   1095
   End
   Begin VB.Label Label2 
      Alignment       =   1  'Right Justify
      BackColor       =   &H00FFFFFF&
      Caption         =   "Document 2:"
      Height          =   255
      Left            =   480
      TabIndex        =   9
      Top             =   1440
      Width           =   1095
   End
   Begin VB.Label Label1 
      Alignment       =   1  'Right Justify
      BackColor       =   &H00FFFFFF&
      Caption         =   "Document 1:"
      Height          =   255
      Left            =   480
      TabIndex        =   7
      Top             =   960
      Width           =   1095
   End
   Begin VB.Label Label14 
      Alignment       =   1  'Right Justify
      BackColor       =   &H00FFFFFF&
      Caption         =   "MID:"
      Height          =   255
      Left            =   480
      TabIndex        =   5
      Top             =   360
      Width           =   1095
   End
   Begin VB.Label lblCommodity 
      Alignment       =   1  'Right Justify
      BackColor       =   &H00FFFFFF&
      Caption         =   "Manufacturer:"
      Height          =   255
      Index           =   2
      Left            =   4920
      TabIndex        =   4
      Top             =   360
      Width           =   1215
   End
End
Attribute VB_Name = "frmCommodityMore"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

'General Section
Public g_rsManufacturer As ADODB.Recordset
Attribute g_rsManufacturer.VB_VarHelpID = -1
Dim boolSaveRequired As Boolean
'

'---------------------------------------------------------------------------------------
' Procedure : AssignFormGlobalVars()
' DateTime  : 1/10/2006
' Purpose   : Assign LTL Global Vars
'---------------------------------------------------------------------------------------
'
Public Sub AssignFormGlobalVars()
    
    
End Sub

Private Sub cmdCancel_Click()

    Unload Me
    If frmShip.Visible Then frmShip.SetFocus
    
End Sub

'---------------------------------------------------------------------------------------
' Procedure : cmdSave_Click()
' DateTime  : 01/10/2006
' Purpose   : Save/Exit clicked, assign global vars, hide form and set focus to Ship form
'---------------------------------------------------------------------------------------
'
Private Sub cmdSave_Click()
    
    On Error GoTo EH
    
    Dim strQuery As String
    
    If boolSaveRequired Then
        
    End If
    
    Me.Hide
    If frmShip.Visible Then frmShip.SetFocus

    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, "frmCommodityMore:cmdSave_Click"

End Sub



'---------------------------------------------------------------------------------------
' Module    : Form_Activate()
' DateTime  : 1/11/2006
' Author    : Chris Elwell
' Purpose   : Set values when form gets focus
'---------------------------------------------------------------------------------------
'
Private Sub Form_Activate()
    On Error GoTo EH

    Dim strQuery As String
    
    If cboMID.Text <> "" And textFCCAddress.Text = "" Then
        Set g_rsManufacturer = New ADODB.Recordset
        strQuery = "SELECT * FROM Manufacturer WHERE [MID] = " & SingleQuotes(cboMID.Text)
        g_rsManufacturer.Open strQuery, g_connFSMSClient, adOpenStatic, adLockOptimistic
        If Not g_rsManufacturer.EOF Then
            textFCCAddress.Text = g_rsManufacturer!AddressLabel
        End If
    End If
    
    Exit Sub

EH:
    MsgBox Err.Description, vbCritical, "frmCommodityMore:Form_Activate"

End Sub
'---------------------------------------------------------------------------------------
' Procedure : Form_KeyDown()
' DateTime  : 01/10/2006
' Purpose   : Enter key pressed sends a TAB to move to next field
'---------------------------------------------------------------------------------------
'
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
    If Not TypeOf Me.ActiveControl Is CommandButton Then
        If Shift = 0 And KeyCode = 13 Then
            SendKeys "{TAB}"
        End If
    End If
End Sub
'---------------------------------------------------------------------------------------
' Module    : Form_Load()
' DateTime  : 1/11/2006
' Author    : Chris Elwell
' Purpose   : Load values on intial form load
'---------------------------------------------------------------------------------------
'
Private Sub Form_Load()
    On Error GoTo EH

    Dim strQuery As String
    
    'Instantiate global recordset
    Set g_rsManufacturer = New ADODB.Recordset
    
    Set g_rsManufacturer = New ADODB.Recordset
    strQuery = "SELECT [MID] FROM Manufacturer ORDER by 1"
    g_rsManufacturer.Open strQuery, g_connFSMSClient, adOpenStatic, adLockOptimistic
    
    Do Until g_rsManufacturer.EOF
        cboMID.AddItem g_rsManufacturer!Mid
        g_rsManufacturer.MoveNext
    Loop
        
    cboDocument1.AddItem "FCC"
    cboDocument1.AddItem "FDA2877"
    
    cboDocument2.AddItem "FCC"
    cboDocument2.AddItem "FDA2877"
    
    cboDocument3.AddItem "FCC"
    cboDocument3.AddItem "FDA2877"
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, "frmCommodityMore:Form_Load"

End Sub

'---------------------------------------------------------------------------------------
' Procedure : Form_Unload()
' DateTime  : 1/16/2006
' Purpose   : Kills objects
'---------------------------------------------------------------------------------------
'
Private Sub Form_Unload(Cancel As Integer)
    On Error Resume Next
    Set g_rsManufacturer.DataSource = Nothing
    If g_rsManufacturer.State = adStateOpen Then g_rsManufacturer.Close
    Set g_rsManufacturer = Nothing
    Set g_frmCommodityMore = Nothing
End Sub

